New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uxland/utilities

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uxland/utilities

Utilities

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

UXL Utilities npm version

Build StatusStatementsBranchesFunctionsLines
BuildStatusStatementsBranchesFunctionsLines

Installation

npm i @uxland/utilities

Usage

Collect

Returns nested object value and prototype from provided key.

collect("foo", "foo"); //=> {}
collect({ foo: "bar" }); //=> {0: 'b', 1: 'a', 2: 'r'}
collect({ foo: { bar: "qux" } }); //=> {bar: 'qux'}

Constant Builder

Converts a string to a new one with provided prefix and suffix in builder

constantBuilder("PREFIX")("CONSTANT"); //=> 'PREFIX:CONSTANT'
constantBuilder("PREFIX", "SUFFIX")("CONSTANT"); //=> 'PREFIX:CONSTANT:SUFFIX'
constantBuilder("PREFIX", "SUFFIX", "$$")("CONSTANT"); //=> 'PREFIX$$CONSTANT$$SUFFIX'

Invariant

Check if condition is fulfilled, otherwise throws supplied message error

invariant(R.is("number")(3), "Supplied value is not a number"); //=> undefined
invariant(R.is("number")("3"), "Supplied value is not a number"); //=> 'Supplied value is not a number'

No operation

Defines an empty function

nop(); //=> undefined

FAQs

Package last updated on 13 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc